import React, { Component } from 'react'
import { Router, Route, Switch } from 'react-router-dom'
import Login from './pages/Login'
import Layout from 'pages/Layout'
import AuthRoute from 'components/AuthRoute'
import NotFound from './pages/NotFound/index'
import history from 'utils/history'
export default class App extends Component {
  render() {
    return (
      <Router history={history}>
        <div>
          <Switch>
            <Route path="/login" component={Login}></Route>
            <AuthRoute path="/home" component={Layout}></AuthRoute>
            <Route component={NotFound} />
          </Switch>
        </div>
      </Router>
    )
  }
}
